%{
#include <stdio.h>
#include <string.h> 
#include "parser.tab.h"
%}
%%

"if"            return IF;
[0-9]+		yylval.number=atoi(yytext); return NUMBER;
\n		;
[ \t]+		;
"$"		return DOLLAR;
"{"		return LBRACE;
"}"		return RBRACE;
"("		return LPAREN;
")"		return RPAREN;
"["		return LSQUAR;
"]"		return RSQUAR;
","		return COMMA;
";"		;
"~"		return MATCH;
BEGIN		return BBEGIN;
END		return BEND;
print		return PRINT;
"--"            return DEC;
"++"            return INC;
"-="            return SUB;
"+="            return ADD;
"="             return EQUAL;
"/"             return SLASH;
">"             return GT;
"<"             return LT;
">="            return GE;
"<="            return LE;
"=="            return EQ;
"!="            return NE;
for		return FOR;
in		return IN;
[a-z0-9]+ 	yylval.string=strdup(yytext); return VAR;
%%
